<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateAreaTable extends Migration
{
    public function up()
    {
        Schema::create('area', function (Blueprint $table) {
            $table->Increments('id');
            $table->Integer('code')->comment('区域编码');
            $table->string('name')->comment('区域名称');
            $table->Integer('pid')->nullable()->comment('上级ID');
            $table->string('full_name')->nullable()->comment('全部名称');
        });
    }
    public function down()
    {
        Schema::dropIfExists('area');
    }
}
